﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TaskList.aspx.cs" Inherits="Task.TaskList" %>

<%@ Register Assembly="MyLib" Namespace="MyLib.Web.UI" TagPrefix="app" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="../Content/js/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="well well-small">
        <i class="icon-home"></i>
        <strong>
            <asp:Literal ID="litTitle" runat="server"></asp:Literal>
        </strong><span class="badge badge-warning">
            <%=MyPager1.RecordCount %></span>
    </div>
    <div class="row-fluid">
        <div class="span1">
            <label>
                流程类别</label></div>
        <div class="span2">
            <asp:DropDownList ID="ddlProcessCategory" Width="165" runat="server">
            </asp:DropDownList>
        </div>
        <div class="span1">
            <label>
                <%=Task.Content.lang.TaskList_ProcessName %></label></div>
        <div class="span3">
            <asp:TextBox ID="txtProcessName" class="input-large" runat="server"></asp:TextBox></div>
        <div class="span1">
            <label>
                <%=Task.Content.lang.TaskList_StartTime %></label></div>
        <div class="span3">
            <asp:TextBox ID="txtStartDate" CssClass="input-small" runat="server" onclick="WdatePicker({skin:'whyGreen',dateFmt:'yyyy/MM/dd'})"></asp:TextBox>
            -
            <asp:TextBox ID="txtEndDate" CssClass="input-small" runat="server" onclick="WdatePicker({skin:'whyGreen',dateFmt:'yyyy/MM/dd'})"></asp:TextBox></div>
    </div>
    <div class="row-fluid">
        <div class="span1">
            <label>
                <%=Task.Content.lang.TaskList_Summary %></label></div>
        <div class="span2">
            <asp:TextBox ID="txtSummary" class="input-medium" runat="server"></asp:TextBox></div>
        <div class="span1">
            <label>
                <%=Task.Content.lang.TaskList_Incident %></label></div>
        <div class="span3">
            <asp:TextBox ID="txtIncidentStart" CssClass="input-small" runat="server"></asp:TextBox>
            &nbsp;-
            <asp:TextBox ID="txtIncidentEnd" CssClass="input-small" runat="server"></asp:TextBox></div>
        <div class="span1">
            <asp:Button ID="btnQuery" runat="server" CssClass="btn  btn-primary" Text="查询" OnClick="btnQuery_Click" />
        </div>
    </div>
    <!--query-->
    <div>
        <table class="table table-bordered table-striped table-condensed">
            <thead>
                <tr>
                    <th>
                        <%=Task.Content.lang.TaskList_Monitor %>
                    </th>
                    <th>
                        <%=Task.Content.lang.TaskList_Status %>
                    </th>
                    <th>
                        <%=Task.Content.lang.TaskList_ProcessName %>
                    </th>
                    <th>
                        <%=Task.Content.lang.TaskList_Incident %>
                    </th>
                    <th>
                        <%=Task.Content.lang.TaskList_Summary %>
                    </th>
                    <th>
                        <%=Task.Content.lang.TaskList_StepName %>
                    </th>
                    <th>
                        <%=Task.Content.lang.TaskList_StartTime %>
                    </th>
                </tr>
            </thead>
            <tbody>
                <asp:Repeater ID="rptTask" runat="server">
                    <ItemTemplate>
                        <tr>
                            <td>
                                <a href="TaskStatus.aspx?ProcessName=<%#Server.UrlEncode(Eval("ProcessName").ToString().Trim()) %>&Incident=<%#Eval("Incident") %>"
                                    target="_blank">
                                    <img src="Content/img/task_monitor.gif" /></a>
                            </td>
                            <td>
                                <img src="Content/img/<%#GetStatusImage(Eval("SubStatus").ToString()) %>" />
                            </td>
                            <td>
                                <a href="OpenForm.aspx?TaskId=<%#Eval("TaskID") %>" target="_blank">
                                    <%#Eval("ProcessName")%></a>
                            </td>
                            <td>
                                <%#Eval("Incident")%>
                            </td>
                            <td>
                                <%#Eval("Summary")%>
                            </td>
                            <td>
                                <%#Eval("StepLabel")%>
                            </td>
                            <td>
                                <%#Convert.ToDateTime(Eval("StartTime")).ToString("yyyy/MM/dd HH:mm:ss")%>
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
            </tbody>
        </table>
        <app:MyPager ID="MyPager1" NextPageText="下一页" runat="server" OnPageIndexChanged="MyPager1_PageIndexChanged" />
    </div>
    <!--list table-->
    <div style="display: none">
        <asp:TextBox ID="txtUserAccount" runat="server"></asp:TextBox>
        <asp:TextBox ID="txtType" runat="server"></asp:TextBox>
        <asp:TextBox ID="txtCurrentProcessCategory" runat="server"></asp:TextBox>
    </div>
    </form>
</body>
</html>
